package com.yanchi.factory.simple;

public class Consumer {
    public static void main(String[] args) {

        // 普通方式
        Car wuLing = new WuLing();
        Car tesla = new Tesla();

        wuLing.name();
        tesla.name();

        // 简单工厂
        Tesla tesla1 = CarFactory.getTesla();
        WuLing wuLing1 = CarFactory.getWuLing();
        tesla1.name();
        wuLing1.name();


    }
}
